<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <!--
            This is for testing. It mimics a cronjob, but with the output in
            the browser
        -->
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>

        <script type="text/javascript">
            function callAjax(name){
                $.ajax({
                    url: name,
                    success: function(data) {
                        $('#result').html($('#result').html() + data);
                    }
                });
            }
            
            var updateEveryNSecs = 10;

            function general(){
                callAjax('GeneralTasks.php');
            }
            function sync(){
                callAjax('SyncData.php');
            }
            function update(){
                callAjax('UpdateSite.php');
            }
            $(document).ready(function(){
                sync();
                setInterval(sync, 30*60*1000);
                setInterval(update, updateEveryNSecs*1000);
                setInterval(general, 30*60*1000);

            });
        </script>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <pre id="result"></pre>
    </body>
</html>
